package leetcode.code0094;

import java.util.ArrayList;
import java.util.List;

import leetcode.helper.tree.TreeNode;

public class Solution extends Solution94 {

	@Override
	public List<Integer> inorderTraversal(TreeNode root) {
		List<Integer> ans = new ArrayList<>();
		this.m(root, ans);
		return ans;
	}

	private void m(TreeNode root, List<Integer> ans) {
		if (root == null)
			return;
		this.m(root.left, ans);
		ans.add(root.val);
		this.m(root.right, ans);
	}

	public static void main(String[] args) {
		Solution so = new Solution();
		so.debug1();

	}

}
